<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link href="style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="check_form.js"></script>
</head>
<body>
	
<?php

$type = $_REQUEST['type'];
$name = $_REQUEST['name'];
$description = $_REQUEST['description'];

// Display confirmation
if ($type) {
	if ($type == "mf") {
		$orig_method = $_REQUEST['orig_method'];
		$new_method = $_REQUEST['new_method'];
		
		echo "<h2>Success! You've added a new method fragment:</h2>";
		echo "<b>Method Fragment Name</b>: $name<br/>";
		echo "<b>Description</b>: $description<br/>";
		echo "<b>Originating Methodology</b>: ";
		if ($new_method) {
			echo "$new_method<br/>";
		} else {
			echo "$orig_method<br/>";
		}
	} else {
	$goal_type = $_REQUEST['goal_type'];
	$super_goal = $_REQUEST['super_goal'];
	
	echo "<h2>Success! You've added a new requisite:</h2>";
	echo "<b>Goal Name</b>: $name<br/>";
	echo "<b>Description</b>: $description<br/>";
	echo "<b>Type of Goal</b>: $goal_type<br/>";
	echo "<b>Subgoal of</b>: $super_goal<br/>";	
	}
	/* 	echo "<hr/>"; */
}

?>

<div id="wrapper">
<!-- 	Method Fragment -->
	<div class="form_heading">Add a Requisite</div>
	
	<form name="add_mf" action="add_req.php" method="post" onsubmit="return check_mf(this)">
		Method Fragment Name:<br/>
		<input type="text" size="50" name="name"/><br/>
		Description:<br/>
		<textarea cols="50" rows="5" name="description"></textarea><br/>
		Originating Methodology:
		<select name="orig_method">
			<option>Agile</option>
			<option>Some Methodology</option>
			<option>Example Methodology</option>
			<option>Other</option>
		</select><br/>
		If other, name this methodology (otherwise leave blank): <input type="text" size="40" name="new_method"/><br/><br/>
		<input type="submit" value="Submit"/>
	</form>
</div>	

</body>
</html>